// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FA_ASSETS
// * CreateDate    : 2012/4/17 11:09:14
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/17 11:09:14
// * LastChanger   : 2012/4/17 11:09:14
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FaAssetsEntity : EntityBase
    {
        public FaAssetsTable TableSchema
        {
            get
            {
                return FaAssetsTable.Current;
            }
		}
		
		public FaAssetsEntity()
        {

        }
		
		public FaAssetsEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AssetId = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_ID"]));
			this.AssetTypeId = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_TYPE_ID"]));
			this.ManufacturerCycle = Convert.ToString(CommonFunctions.ToObject(dr["MANUFACTURER_CYCLE"]));
			this.ParentAsset = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_ASSET"]));
			this.AssetCode = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_CODE"]));
			this.AssetName = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_NAME"]));
			this.AssetDescription = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_DESCRIPTION"]));
			this.AssetSpec = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_SPEC"]));
			this.PurchaseDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PURCHASE_DATE"]));
			this.Manufacturer = Convert.ToString(CommonFunctions.ToObject(dr["MANUFACTURER"]));
			this.NeedMaintenance = Convert.ToDecimal(CommonFunctions.ToObject(dr["NEED_MAINTENANCE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.ProductionDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PRODUCTION_DATE"]));
			this.ProductionCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCTION_CODE"]));
			this.NextMaintainDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["NEXT_MAINTAIN_DATE"]));
			this.NextMaintainItem = Convert.ToString(CommonFunctions.ToObject(dr["NEXT_MAINTAIN_ITEM"]));
			this.MaintainRemark = Convert.ToString(CommonFunctions.ToObject(dr["MAINTAIN_REMARK"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
        }
		
		public FaAssetsEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AssetId = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_ID"]));
			this.AssetTypeId = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_TYPE_ID"]));
			this.ManufacturerCycle = Convert.ToString(CommonFunctions.ToObject(dr["MANUFACTURER_CYCLE"]));
			this.ParentAsset = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_ASSET"]));
			this.AssetCode = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_CODE"]));
			this.AssetName = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_NAME"]));
			this.AssetDescription = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_DESCRIPTION"]));
			this.AssetSpec = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_SPEC"]));
			this.PurchaseDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PURCHASE_DATE"]));
			this.Manufacturer = Convert.ToString(CommonFunctions.ToObject(dr["MANUFACTURER"]));
			this.NeedMaintenance = Convert.ToDecimal(CommonFunctions.ToObject(dr["NEED_MAINTENANCE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.ProductionDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PRODUCTION_DATE"]));
			this.ProductionCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCTION_CODE"]));
			this.NextMaintainDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["NEXT_MAINTAIN_DATE"]));
			this.NextMaintainItem = Convert.ToString(CommonFunctions.ToObject(dr["NEXT_MAINTAIN_ITEM"]));
			this.MaintainRemark = Convert.ToString(CommonFunctions.ToObject(dr["MAINTAIN_REMARK"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FaAssetsTable.Current;
            }
        }
		
		#region Perporty List
        public string AssetId
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_ASSET_ID)); }
            set { SetData(FaAssetsTable.C_ASSET_ID, value); }
        }
		
        public string AssetTypeId
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_ASSET_TYPE_ID)); }
            set { SetData(FaAssetsTable.C_ASSET_TYPE_ID, value); }
        }
		
        public string ManufacturerCycle
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_MANUFACTURER_CYCLE)); }
            set { SetData(FaAssetsTable.C_MANUFACTURER_CYCLE, value); }
        }
		
        public string ParentAsset
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_PARENT_ASSET)); }
            set { SetData(FaAssetsTable.C_PARENT_ASSET, value); }
        }
		
        public string AssetCode
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_ASSET_CODE)); }
            set { SetData(FaAssetsTable.C_ASSET_CODE, value); }
        }
		
        public string AssetName
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_ASSET_NAME)); }
            set { SetData(FaAssetsTable.C_ASSET_NAME, value); }
        }
		
        public string AssetDescription
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_ASSET_DESCRIPTION)); }
            set { SetData(FaAssetsTable.C_ASSET_DESCRIPTION, value); }
        }
		
        public string AssetSpec
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_ASSET_SPEC)); }
            set { SetData(FaAssetsTable.C_ASSET_SPEC, value); }
        }
		
        public DateTime PurchaseDate
        {
            get { return Convert.ToDateTime(GetData(FaAssetsTable.C_PURCHASE_DATE)); }
            set { SetData(FaAssetsTable.C_PURCHASE_DATE, value); }
        }
		
        public string Manufacturer
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_MANUFACTURER)); }
            set { SetData(FaAssetsTable.C_MANUFACTURER, value); }
        }
		
        public decimal NeedMaintenance
        {
            get { return Convert.ToDecimal(GetData(FaAssetsTable.C_NEED_MAINTENANCE)); }
            set { SetData(FaAssetsTable.C_NEED_MAINTENANCE, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_STATUS)); }
            set { SetData(FaAssetsTable.C_STATUS, value); }
        }
		
        public DateTime ProductionDate
        {
            get { return Convert.ToDateTime(GetData(FaAssetsTable.C_PRODUCTION_DATE)); }
            set { SetData(FaAssetsTable.C_PRODUCTION_DATE, value); }
        }
		
        public string ProductionCode
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_PRODUCTION_CODE)); }
            set { SetData(FaAssetsTable.C_PRODUCTION_CODE, value); }
        }
		
        public DateTime NextMaintainDate
        {
            get { return Convert.ToDateTime(GetData(FaAssetsTable.C_NEXT_MAINTAIN_DATE)); }
            set { SetData(FaAssetsTable.C_NEXT_MAINTAIN_DATE, value); }
        }
		
        public string NextMaintainItem
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_NEXT_MAINTAIN_ITEM)); }
            set { SetData(FaAssetsTable.C_NEXT_MAINTAIN_ITEM, value); }
        }
		
        public string MaintainRemark
        {
            get { return Convert.ToString(GetData(FaAssetsTable.C_MAINTAIN_REMARK)); }
            set { SetData(FaAssetsTable.C_MAINTAIN_REMARK, value); }
        }
		
        public decimal Price
        {
            get { return Convert.ToDecimal(GetData(FaAssetsTable.C_PRICE)); }
            set { SetData(FaAssetsTable.C_PRICE, value); }
        }
		
		#endregion
	}
	
	
}	

